# -*-encoding:utf8-*-
from django.shortcuts import render, redirect
from include.GView import GView


# Create your views here.


def list(request):
    '''
    登陆展示页面
    :param request:
    :return:
    '''
    products = [{'id': 1, 'name': '学习中心'}, {'id': 2, 'name': '服务中心'}]
    datas = []
    data = {'id': 1, 'name': '学习中心3.0', 'env': '学习中心-dev环境', 'domain': 'https://xue-dev.hfjy.com',
            'db_config': "host='127.0.0.1', port=3306, user='root', passwd='root', db='test', charset='utf8'"}
    datas.append(data)
    datas.append(data)
    datas.append(data)
    datas.append(data)
    return render(request, 'common/list.html', locals())


def show(request):
    id = request.POST.get('id', '')
    return render(request, 'common/show.html', locals())


def connect(request):
    id = request.GET.get('id', '')
    return GView.VOK()


def save(request):
    id = request.GET.get('id', '')
    return GView.VOK()
